package com.vcg.vdam.config.redislimit;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName TestLimitController
 * @DescripTion
 * @Author yangxing
 * @Date 2020/9/7 12:53
 **/
@RestController
public class TestLimitController {

    @GetMapping(value = "/testLimit")
    //代表十秒只能访问一次
    @RateLimit(limit = 5,refreshInterval = 100)
    public String testLimit(){
        System.out.println("我在测试限流");
        return "我在测试限流";
    }
}
